package com.itheima.homework15;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Test05 {
    public static void main(String[] args) throws IOException {
        ServerSocket ss=new ServerSocket(8888);
        Socket accept = ss.accept();
        InputStream inputStream = accept.getInputStream();
        byte [] bytes=new byte[1024];
        int len;
        while ((len=inputStream.read(bytes))!=-1){
            System.out.println(new String(bytes,0,bytes.length));
        }
        ss.close();
    }
}
